package cn.qiyu5522.tk_ems.entity.dto;

import cn.qiyu5522.tk_ems.entity.User;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @BelongsProject: tk_ems
 * @BelongsPackage: cn.qiyu5522.tk_ems.entity.dto
 * @Author: TangQi
 * @CreateTime: 2023-02-01  09:57
 * @Description: TODO
 * @Version: 1.0
 */
@Data
@ApiModel("用户DTO对象")
public class UserDTO {
    @ApiModelProperty("用户编号")
    @NotNull(message ="用户编号不能为空",groups = {User.Update.class})
    private Long id;
    @ApiModelProperty(value = "账号")
    @NotBlank(message ="用户编号不能为空",groups = {User.Update.class,User.Insert.class})
    private String username;
    @ApiModelProperty("密码")
    @NotBlank(message ="密码不能为空",groups = {User.Update.class,User.Insert.class})
    private String password;
    @ApiModelProperty(value = "用户名")
    @NotBlank(message ="用户名不能为空",groups = {User.Update.class,User.Insert.class})
    private String name;
    @ApiModelProperty(value = "头像")
    private String avatar;
    @ApiModelProperty(value = "描述")
    private String description;
    @ApiModelProperty(value = "状态（0启用，1停用)")
    @NotNull(message ="状态不能为空",groups = {User.Update.class,User.Insert.class})
    private Integer state;

    private Integer roleId;
}
